{include file="Public/header"}
<header class="am-topbar am-topbar-inverse admin-header">
    <div class="am-topbar-brand">
        <a href="javascript:;" class="tpl-logo">
            <img src="__STATIC__/admin/images/logo.png">
        </a>
    </div>
    <div class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right"></div>
    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
            <!--<li title="清除缓存">
                <a href="javascript:clear_cache()" class="tpl-header-list-link">
                    清除缓存
                </a>
            </li>-->
            <li title="注销登录">
                <a href="{:url('admin/login/quit')}" class="tpl-header-list-link">
                    <span class="am-icon-sign-out tpl-header-list-ico-out-size"></span>
                </a>
            </li>
        </ul>
    </div>
</header>
<div class="tpl-page-container tpl-page-header-fixed">
    <div class="tpl-left-nav tpl-left-nav-hover" style="margin-left: -10px">
        <div class="tpl-left-nav-title">
            导航列表
        </div>
        <div class="tpl-left-nav-list">
            <ul class="tpl-left-nav-menu">
                {foreach $menu_list as $menu}
                    <li class="tpl-left-nav-item">
                        {php}
                            $b = 0;
                            foreach($menu['child'] as $k => $v){
                                if (strtolower(request()->controller().'/'.request()->action()) == $v['url']){
                                    $b = 1;
                                    break;
                                }
                            }
                           //dump($menu['child']);
                        {/php}
                        <a class="nav-link tpl-left-nav-link-list" {if $b == 1} class="active" {/if}>
                            <i class="{$menu.icon}"></i>
                            <span>{$menu.name}</span>
                            {if count($menu.child) > 0}
                                <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                            {/if}
                        </a>
                        {if count($menu.child) > 0}
                            <ul class="tpl-left-nav-sub-menu" style="display:{if $b != 1}none{else}block{/if};">
                                <li>
                                    {foreach $menu.child as $menu_child}
                                        <a href="__ROOT__/admin/{$menu_child.url}" id="{:request()->controller()}/{:request()->action()}" {if strtolower(request()->controller().'/'.request()->action()) == $menu_child.url} class="active"{/if}>
                                            <i class="am-icon-angle-right"></i>
                                            <span>{$menu_child.name}</span>
                                            <!--<i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>-->
                                        </a>
                                    {/foreach}
                                </li>
                            </ul>
                        {/if}
                    </li>
                {/foreach}
            </ul>
        </div>
    </div>
</div>

<style>
    .am-dropdown{
        width: 100%;
        padding-left: 30px;
        margin-bottom: 10px;
    }
    .am-dropdown div{
        color: #000;
    }
</style>
<div class="tpl-content-wrapper">